require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/mallA/detail" ], {
    "08f9": function(t, e, o) {
        o.r(e);
        var a, n = o("2023"), r = o.n(n);
        for (a in n) "default" !== a && function(t) {
            o.d(e, t, function() {
                return n[t];
            });
        }(a);
        e.default = r.a;
    },
    "0a0c": function(t, e, o) {},
    2023: function(t, a, n) {
        (function(d) {
            Object.defineProperty(a, "__esModule", {
                value: !0
            }), a.default = void 0;
            var t, c = (t = n("a34a")) && t.__esModule ? t : {
                default: t
            };
            function u(t, e, o, a, n, r, i) {
                try {
                    var s = t[r](i), d = s.value;
                } catch (t) {
                    return o(t), 0;
                }
                s.done ? e(d) : Promise.resolve(d).then(a, n);
            }
            function e(s) {
                return function() {
                    var t = this, i = arguments;
                    return new Promise(function(e, o) {
                        var a = s.apply(t, i);
                        function n(t) {
                            u(a, e, o, n, r, "next", t);
                        }
                        function r(t) {
                            u(a, e, o, n, r, "throw", t);
                        }
                        n(void 0);
                    });
                };
            }
            var i = getApp(), o = {
                data: function() {
                    return {
                        module_name: i.globalData.module_name,
                        userinfo: d.getStorageSync("userinfo"),
                        setting: d.getStorageSync("setting"),
                        opacity: 0,
                        showNewClip: !1,
                        showSkeleton: !0,
                        showDialog: !1,
                        showDialogC: !1,
                        showDialogBA: !1,
                        shopPwdDialog: !1,
                        waitDialog: !1,
                        commission_switch: !0,
                        isToShare: !1,
                        isToShareBool: !1,
                        showRelation: !1,
                        swiperList: [],
                        goods: {
                            final_price: 0,
                            commission: 0,
                            price: 0,
                            sales: 0,
                            pingtai: "jd",
                            title: "",
                            quan_discount: 0
                        },
                        params: {},
                        isCollect: !1,
                        StatusBar: d.getStorageSync("statusBarHeight"),
                        CustomBar: d.getStorageSync("CustomBar"),
                        goodsDetail: "",
                        next_level: "",
                        next_level_id: "",
                        taobaoUrl: {},
                        shareInfo: {},
                        couponText: "",
                        beianContent: {},
                        couponTime: "08月01日—08月31日",
                        jdShortUrl: "",
                        isLogin: !1,
                        beianPwd: !1,
                        share_goods_switch: "",
                        beianInfo: "",
                        shop: {},
                        guessList: [],
                        shopPwdText: "",
                        logo: "",
                        shareImage: "",
                        rewardAd: "",
                        rewardedVideoAd: null,
                        adCfg: {},
                        showFloat: !1,
                        showVideoModal: !1,
                        showReward: !1,
                        endTimeKey: "END_TIME",
                        tjpText: {
                            pdd: "拼多多",
                            jd: "京东",
                            tb: "淘宝",
                            wph: "唯品会"
                        },
                        showHb: !1,
                        poster: "",
                        uid: 0,
                        appid: "",
                        path: "",
                        search_id: ""
                    };
                },
                components: {
                    rCanvas: function() {
                        Promise.all([ n.e("common/vendor"), n.e("components/r-canvas/r-canvas") ]).then(function() {
                            return resolve(n("20e0"));
                        }.bind(null, n)).catch(n.oe);
                    }
                },
                props: {},
                onLoad: function(n) {
                    var r = this;
                    return e(c.default.mark(function t() {
                        var e, o, a;
                        return c.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, r.$onLaunched;

                              case 2:
                                (e = r).setting = d.getStorageSync("setting"), e.userinfo = d.getStorageSync("userinfo"), 
                                e.module_name = i.globalData.module_name, e.StatusBar = d.getStorageSync("statusBarHeight"), 
                                e.CustomBar = d.getStorageSync("CustomBar"), o = n, console.log(o), e.uid = parseInt(o.uid), 
                                e.search_id = o.search_id, d.showLoading({
                                    title: "加载中...",
                                    mask: !1
                                }), e = r, a = i.globalData.util.url("entry/wxapp/mall_goods_detail", {
                                    m: i.globalData.module_name
                                }), d.request({
                                    url: a,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: d.getStorageSync("openid"),
                                        goodsid: o.goodsid,
                                        pingtai: o.pt,
                                        goodssign: o.goodssign,
                                        system_type: d.getStorageSync("systemtype")
                                    },
                                    success: function(t) {
                                        200 == t.data.code ? (e.goods = t.data.goods, e.swiperList = t.data.goods.photos, 
                                        e.showSkeleton = !1) : d.showModal({
                                            title: "系统提示",
                                            content: t.data.message,
                                            showCancel: !1,
                                            success: function(t) {
                                                t.confirm && d.navigateBack({
                                                    delta: 1
                                                });
                                            }
                                        }), d.hideLoading();
                                    }
                                });

                              case 16:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                onShareAppMessage: function() {
                    var t = "pagesA/pages/mallA/detail?uid=" + d.getStorageSync("userinfo").user_id + "&pt=" + this.goods.pingtai + "&goodsid=" + this.goods.goods_id + "&goodssign=" + this.goods.goods_sign;
                    return {
                        title: this.goods.title,
                        imageUrl: this.goods.photos[0],
                        path: t
                    };
                },
                methods: {
                    onCopy: function(t) {
                        var e = "pdd" == t.currentTarget.dataset.pingtai ? t.currentTarget.dataset.title + "，" + t.currentTarget.dataset.goodssign + "，" + t.currentTarget.dataset.search_id : t.currentTarget.dataset.title + "，" + t.currentTarget.dataset.goodsid;
                        d.setClipboardData({
                            data: e,
                            success: function(t) {
                                d.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    getgoodsHb: function() {
                        d.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var e = this;
                        if (e.poster) return d.hideLoading(), void (e.showHb = !0);
                        var t = i.globalData.util.url("entry/wxapp/mall_goods_qrcode", {
                            m: i.globalData.module_name
                        });
                        d.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: d.getStorageSync("openid"),
                                goodsid: e.goods.goods_id,
                                pingtai: e.goods.pingtai,
                                goodssign: e.goods.goods_sign,
                                search_id: e.search_id,
                                photo: e.goods.photos[0]
                            },
                            success: function(t) {
                                200 == t.data.code && e.buildHb(t.data.photo, t.data.qrcode);
                            }
                        });
                    },
                    buildHb: function(o, a) {
                        var n = this, r = "         ", i = 60, s = "券后￥";
                        "pdd" != this.goods.pingtai && "wph" != this.goods.pingtai || (r = "             ", 
                        i = 82), "wph" == this.goods.pingtai && 0 == this.goods.quan_discount ? s = "折后￥" : 0 == this.goods.quan_discount && (s = "Vip价￥"), 
                        this.$nextTick(e(c.default.mark(function t() {
                            var e;
                            return c.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return e = n, t.next = 3, n.$refs.rCanvas.init({
                                        canvas_id: "rCanvas",
                                        background_color: "#fff",
                                        canvas_width: 540,
                                        canvas_height: 960,
                                        scale: 1,
                                        hidden: !0
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 3:
                                    return t.next = 5, n.$refs.rCanvas.drawImage({
                                        url: o,
                                        x: 0,
                                        y: 0,
                                        w: 540,
                                        h: 540
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 5:
                                    return t.next = 7, n.$refs.rCanvas.drawRect({
                                        w: i,
                                        h: 32,
                                        x: 20,
                                        y: 550,
                                        color: "red",
                                        font_size: 32,
                                        border_radius: 5
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 7:
                                    return t.next = 9, n.$refs.rCanvas.drawText({
                                        text: e.tjpText[e.goods.pingtai],
                                        x: 22,
                                        y: 575,
                                        font_size: 28,
                                        font_color: "rgba(255,255,255,1)"
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 9:
                                    return t.next = 11, n.$refs.rCanvas.drawText({
                                        text: r + e.goods.title,
                                        x: 20,
                                        y: 577,
                                        max_width: 500,
                                        font_size: 28,
                                        line_height: 32,
                                        line_clamp: 3,
                                        font_color: "black"
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 11:
                                    return t.next = 13, n.$refs.rCanvas.drawImage({
                                        url: a,
                                        x: 300,
                                        y: 680,
                                        w: 200,
                                        h: 200
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 13:
                                    return t.next = 15, n.$refs.rCanvas.drawSpecialText({
                                        general: {
                                            x: 20,
                                            y: 720
                                        },
                                        list: [ {
                                            text: s,
                                            font_color: "red",
                                            font_size: 24
                                        }, {
                                            text: e.goods.final_price,
                                            font_color: "red",
                                            font_size: 32
                                        } ]
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 15:
                                    return t.next = 17, n.$refs.rCanvas.drawSpecialText({
                                        general: {
                                            x: 20,
                                            y: 770
                                        },
                                        list: [ {
                                            text: "原价￥" + e.goods.price,
                                            font_color: "#999999",
                                            font_size: 24,
                                            line_through_height: 1,
                                            line_through_color: "#999999"
                                        } ]
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 17:
                                    if (0 < n.goods.quan_discount) return t.next = 20, n.$refs.rCanvas.drawRect({
                                        w: 190,
                                        h: 50,
                                        x: 20,
                                        y: 820,
                                        color: "#ff9a1e",
                                        border_radius: 50
                                    }).catch(function(t) {
                                        n.error(t);
                                    });
                                    t.next = 22;
                                    break;

                                  case 20:
                                    return t.next = 22, n.$refs.rCanvas.drawText({
                                        text: e.goods.quan_discount + "元优惠券",
                                        x: 45,
                                        y: 855,
                                        font_size: 28,
                                        font_color: "rgba(255,255,255,1)"
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 22:
                                    return t.next = 24, n.$refs.rCanvas.drawText({
                                        text: "长按识别发现好货",
                                        x: 310,
                                        y: 910,
                                        font_size: 22,
                                        font_color: "#999999"
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 24:
                                    return t.next = 26, n.$refs.rCanvas.draw(function(t) {
                                        d.hideLoading(), n.poster = t.tempFilePath, n.showHb = !0;
                                    }).catch(function(t) {
                                        n.error(t);
                                    });

                                  case 26:
                                  case "end":
                                    return t.stop();
                                }
                            }, t);
                        })));
                    },
                    error: function(t) {
                        d.showModal({
                            title: "错误信息",
                            content: t,
                            showCancel: !1
                        });
                    },
                    previewImage: function() {
                        d.previewImage({
                            urls: [ this.poster ],
                            current: 0
                        });
                    },
                    saveImage: function() {
                        d.saveImageToPhotosAlbum({
                            filePath: this.poster,
                            success: function() {
                                d.showToast({
                                    title: "保存成功",
                                    icon: "success"
                                });
                            }
                        });
                    },
                    close: function() {
                        this.showHb = !1;
                    },
                    back: function() {
                        d.navigateBack({
                            delta: 1
                        });
                    },
                    home: function() {
                        d.navigateTo({
                            url: "/pages/index/index"
                        });
                    },
                    getCoupon: function(e) {
                        d.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var o = this;
                        if (o.path) return o.appid ? d.navigateToMiniProgram({
                            appId: o.appid,
                            path: o.path
                        }) : d.setClipboardData({
                            data: o.path,
                            success: function(t) {
                                d.showToast({
                                    title: o.setting.mall_tkl_text || "内容已复制",
                                    icon: "none"
                                });
                            }
                        }), void d.hideLoading();
                        var t = i.globalData.util.url("entry/wxapp/mall_goods_getcoupon", {
                            m: i.globalData.module_name
                        });
                        d.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: d.getStorageSync("openid"),
                                goodsid: e.currentTarget.dataset.goodsid,
                                pingtai: e.currentTarget.dataset.pingtai,
                                goodssign: e.currentTarget.dataset.goodssign,
                                search_id: o.search_id,
                                quan_url: e.currentTarget.dataset.quan_url,
                                uid: o.uid
                            },
                            success: function(t) {
                                200 == t.data.code && ("tb" == e.currentTarget.dataset.pingtai ? (o.path = t.data.tkl, 
                                d.setStorageSync("pid_time", t.data.pid_time), d.getStorageSync("pid_time") != d.getStorageSync("pid_use_time") && d.setStorageSync("pid_use_time", d.getStorageSync("pid_time")), 
                                d.setClipboardData({
                                    data: t.data.tkl,
                                    success: function(t) {
                                        d.showToast({
                                            title: o.setting.mall_tkl_text || "内容已复制",
                                            icon: "none"
                                        });
                                    }
                                })) : (o.appid = t.data.appid, o.path = t.data.path, d.navigateToMiniProgram({
                                    appId: t.data.appid,
                                    path: t.data.path
                                })), d.hideLoading());
                            }
                        });
                    }
                }
            };
            a.default = o;
        }).call(this, n("543d").default);
    },
    "38c5": function(t, e, o) {
        o.d(e, "b", function() {
            return n;
        }), o.d(e, "c", function() {
            return r;
        }), o.d(e, "a", function() {
            return a;
        });
        var a = {
            uSwiper: function() {
                return o.e("uview-ui/components/u-swiper/u-swiper").then(o.bind(null, "48a6"));
            },
            rCanvas: function() {
                return Promise.all([ o.e("common/vendor"), o.e("components/r-canvas/r-canvas") ]).then(o.bind(null, "20e0"));
            },
            uPopup: function() {
                return o.e("uview-ui/components/u-popup/u-popup").then(o.bind(null, "2904"));
            },
            uImage: function() {
                return o.e("uview-ui/components/u-image/u-image").then(o.bind(null, "871d"));
            }
        }, n = function() {
            this.$createElement;
            this._self._c;
        }, r = [];
    },
    "8fb1": function(t, e, o) {
        o.r(e);
        var a, n = o("38c5"), r = o("08f9");
        for (a in r) "default" !== a && function(t) {
            o.d(e, t, function() {
                return r[t];
            });
        }(a);
        o("cf39");
        var i = o("f0c5"), n = Object(i.a)(r.default, n.b, n.c, !1, null, null, null, !1, n.a, void 0);
        e.default = n.exports;
    },
    cf39: function(t, e, o) {
        var a = o("0a0c");
        o.n(a).a;
    },
    eb2e: function(t, e, o) {
        (function(t) {
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            o("0cda"), e(o("66fd")), t(e(o("8fb1")).default);
        }).call(this, o("543d").createPage);
    }
}, [ [ "eb2e", "common/runtime", "common/vendor" ] ] ]);